package com.yanjr.modules.sys.entity;

import java.util.Date;

import org.springframework.stereotype.Component;

import com.yanjr.common.Constants;
import com.yanjr.common.persistence.DataEntity;
import com.yanjr.common.persistence.Annotation.Column;
import com.yanjr.common.persistence.Annotation.Database;
import com.yanjr.common.persistence.Annotation.Table;

/**
 * @ClassName: Menu 
 * @Description: TODO(菜单Entity)
 * @author yanjr big123@126.com 
 * @date 2016年2月25日 下午4:51:35
 */
@Database("jeesite")
@Table("sys_menu")
@Component
public class Menu extends DataEntity<Menu> {

	private static final long serialVersionUID = -8680141387250588753L;
	@Column("id")
	private String id;
//	private Menu parent;	// 父级菜单
	@Column("parent_id")
	private String parentId;	// 父级菜单id
	@Column("parent_ids")
	private String parentIds; // 所有父级编号
	@Column("name")
	private String name; 	// 名称
	@Column("href")
	private String href; 	// 链接
	@Column("target")
	private String target; 	// 目标（ mainFrame、_blank、_self、_parent、_top）
	@Column("icon")
	private String icon; 	// 图标
	@Column("sort")
	private Integer sort; 	// 排序
	@Column("is_show")
	private String isShow; 	// 是否在菜单中显示（1：显示；0：不显示）
	@Column("is_activiti")
	private String isActiviti; 	// 是否同步到工作流（1：同步；0：不同步）
	@Column("permission")
	private String permission; // 权限标识
	@Column("create_by")
	private String createBy;
	@Column("create_date")
	private Date createDate;
	@Column("update_by")
	private String updateBy;
	@Column("update_date")
	private Date updateDate;
	@Column("remarks")
	private String remarks;
	@Column("del_flag")
	private String delFlag = Constants.DEL_FLAG_NORMAL;
	
//	private List<Menu> childList = new ArrayList<>();// 拥有子菜单列表
//	private List<Role> roleList = new ArrayList<>(); // 拥有角色列表

	public Menu(){
		super();
		this.sort = 30;
	}
	
	public Menu(String id){
		this();
		this.id = id;
	}

//	public Menu getParent() {
//		return parent;
//	}
//
//	public void setParent(Menu parent) {
//		this.parent = parent;
//	}

	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getIsShow() {
		return isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}

	public String getIsActiviti() {
		return isActiviti;
	}

	public void setIsActiviti(String isActiviti) {
		this.isActiviti = isActiviti;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

//	public List<Menu> getChildList() {
//		return childList;
//	}
//
//	public void setChildList(List<Menu> childList) {
//		this.childList = childList;
//	}
//
//	public List<Role> getRoleList() {
//		return roleList;
//	}
//
//	public void setRoleList(List<Role> roleList) {
//		this.roleList = roleList;
//	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	

}